home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / Expander / Expander Classes / CExpanderPane.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  2.1 KB  |  66 lines  |  [TEXT/KAHL]

  1. /***********************************************************************************
  2.     CExpanderPane.h
  3.  
  4.     Copyright © 1994 B-Ray Software. All rights reserved.
  5.     Developed using Symantec C++ 7.0.2 and Symantec's TCL library.
  6.     Portions of this code courtesy Symantec, Inc.
  7.  
  8.     This code may be freely distributed as long as this notice remains. This code
  9.     may not be used in any commercial software without the consent of B-Ray Software.
  10.  
  11.     ---
  12.  
  13.     Header for the CExpanderPane class.
  14.  
  15. ***********************************************************************************/
  16. #pragma once
  17.  
  18. #include <CColumnizer.h>
  19. #include <CPane.h>
  20.  
  21.  
  22. class CExpanderPane : public CPane, public CColumnizer {
  23.  
  24. TCL_DECLARE_CLASS
  25.  
  26. private:
  27.     Boolean            selected;    // represents state of pane selection
  28.     Boolean            canSelect;    // if TRUE, pane can be selected
  29.  
  30. protected:
  31.     virtual void    ChangeSelf( long changedIndex, Rect *delta );
  32.     virtual void    HiliteSelf( Boolean state );
  33.  
  34. public:
  35.  
  36.     CExpanderPane();
  37.     CExpanderPane( CView *anEnclosure, CBureaucrat *aSupervisor, short aWidth = 0,
  38.                    short aHeight = 0, short aHLoc = 0, short aVLoc = 0, SizingOption aHSizing = sizFIXEDSTICKY,
  39.                    SizingOption aVSizing = sizFIXEDSTICKY );
  40.     virtual ~CExpanderPane();
  41.  
  42.     virtual void    SetExpanderSize( short aWidth, short aHeight );
  43.  
  44.     virtual CPane    *ChildToPane( void ) { return this; };
  45.     virtual CFamily    *PaneToChild( void ) { return this; };
  46.  
  47.     virtual void    SetSelectedState( Boolean aFlag );
  48.     virtual Boolean    IsSelected( void )                { return selected; };
  49.  
  50.     virtual void    SetCanSelect( Boolean aFlag )    { canSelect = aFlag; };
  51.     virtual Boolean    CanSelect( void )                { return canSelect; };
  52.  
  53.     virtual void    DoClick( Point hitPt, short modifierKeys, long when );
  54.  
  55.     virtual void    ChildMessage( CFamily *aChild, long message, void *param );
  56.     virtual void    ParentMessage( long message, void *param );
  57.  
  58.     virtual void    PutTo( CStream &stream );
  59.     virtual void    GetFrom( CStream &stream );
  60.  
  61.     friend CStream& operator << ( CStream& s, CExpanderPane* p )
  62.         { return PutObject( s, p ); }
  63.     friend CStream& operator >> ( CStream& s, CExpanderPane*& p )
  64.         { return GetObject( s, p ); }
  65. };
  66.